<?php
include_once "accesscontrol.php";
include_once "index.php";

$timestamp = time() - (90 * 24 * 60 * 60);
$datetime = date("Y-m-d h:i:s", $timestamp);

//
// Start retrive data from database
//
$q1 = "SELECT count(uname) FROM job_seeker_info " .
      "WHERE (`modifiedTime` IS NULL AND `createdTime` < '$datetime') " .
      "OR (`modifiedTime` IS NOT NULL AND `modifiedTime` < '$datetime' )";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);

//
// Total jobseekers whose do not have update ther resume > 90 days
//
$total = $a1[0];

//
// Create subject and message body to send email 
//
$sub = "Please Update Your Resume At {sitename}";
$msg = "Hello {uname},

kindly to inform you that you should update your resume. 			  

Thank you";

?>


<br><br><br>
<form action="reminder.php" method=post>
  <table align="center" width="400" class="BlackText">
    <tr>
      <td colspan="2" align="center" class="HeaderClass"><font size="3"><b>Update Reminder</b></font><br />
          <br /></td>
    </tr>
  </table>
<table align=center width=460 class=BlackLink>


No of jobseekers need to update resume: <?=$total?><br><br>


<tr>
	<td align=right><b>Subject: </b></td>
	<td><input type=text name=subject value="<?=$sub?>"></td>
</tr>

<tr>
	<td valign=top align=right><b> Message: </td>
	<td><textarea rows=6 cols=45 name=message><?=$msg?></textarea></td>
</tr>

<tr>
	<td colspan=2 align=center>
	<input type=submit name=submit value=Send>
	</td>
</tr>
</table>
</form>
<? include_once('../footer.php'); ?>